package com.keguoyu.easymvp.commons;

public abstract class PluginFactory<T> {

  private T t;

  protected abstract T createInstance();

  public synchronized final T getInstance() {
    if (t == null) {
      t = createInstance();
    }
    return t;
  }

}
